/*
** Mortem's HGE Addon 1.4
** Copyright (C) 2006-2007, Osokin 'elmortem' Makar
** http://elmortem.mirgames.ru
**
** Alternative config. Read only.
*/

#ifndef _MHACFG_H_
#define _MHACFG_H_

#include <hge.h>
//#include <windows.h>
//#include <wchar.h>

void mhaCfg_Init(const HGE_CHAR *filename);
int mhaCfg_GetInt(const HGE_CHAR *section, const HGE_CHAR *name, int def_val);
float mhaCfg_GetFloat(const HGE_CHAR *section, const HGE_CHAR *name, float def_val);
HGE_CHAR* mhaCfg_GetString(const HGE_CHAR *section, const HGE_CHAR *name, const HGE_CHAR *def_val);


class mhaIni {
public:
	mhaIni(const HGE_CHAR *filename);
	~mhaIni(void);

	int GetInt(const HGE_CHAR *section, const HGE_CHAR *name, int def_val);
	float GetFloat(const HGE_CHAR *section, const HGE_CHAR *name, float def_val);
	HGE_CHAR* GetString(const HGE_CHAR *section, const HGE_CHAR *name, const HGE_CHAR *def_val);

	void SetInt(const HGE_CHAR *section, const HGE_CHAR *name, int val);
	void SetFloat(const HGE_CHAR *section, const HGE_CHAR *name, float val);
	void SetString(const HGE_CHAR *section, const HGE_CHAR *name, const HGE_CHAR *val);

protected:
	HGE_CHAR FileName[260];
	HGE_CHAR String[1024];
};

#endif